package com.zhima.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhima.entity.OjUserQuestion;
import com.zhima.enums.UserQuestionState;
import com.zhima.vo.SimpleQuestionVO;
import com.zhima.vo.UserQuestionVO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zhima
 * @since 2023-08-25
 */
public interface OjUserQuestionService extends IService<OjUserQuestion> {

    Page<UserQuestionVO> pageQueryUserQuestion(Long userId, Long pageNum, Long pageSize);

    boolean addUserQuestion(Long userId, Long questionId, UserQuestionState userQuestionState);

    /**
     * 返回用户的AC的题目map
     * 按照题目难度做映射
     *
     * @param userId
     * @return
     */
    Map<String, List<SimpleQuestionVO>> getAcQuestions(Long userId);
}
